package com.liaozl.sca.account.sentinel;

import com.liaozl.sca.common.dto.Result;
import com.liaozl.sca.common.enums.ResultCodeEnum;
import lombok.extern.slf4j.Slf4j;

/**
 * @Description:
 * @version: v1.0.0
 * @author: liaozuliang
 * @date: 2021/9/18 14:22
 */
@Slf4j
public class SentinelFallback {

    public static Result defaultFallback() {
        log.error("请求被熔断了, defaultFallback");
        return Result.failed(ResultCodeEnum.REQUEST_ERROR);
    }

    public static Result getByUserId2Fallback(Long userId) {
        log.error("请求被熔断了, getByUserId2Fallback");
        return Result.failed(ResultCodeEnum.REQUEST_ERROR);
    }
}
